In this paper, we construct an accurate linear model describing the propagation of both acoustic and gravity waves in water. This original model is obtained by the linearization of the compressible Euler equations, written in Lagrangian coordinates. The system is studied in the isentropic case, with a free surface, an arbitrary bathymetry, and vertical variations of the background temperature and density. We show that our model is an extension of some models from the literature to the case of a non-barotropic fluid with a variable sound speed. Other models from the literature are recovered from our model through two asymptotic analyses, one for the incompressible regime and one for the acoustic regime. We also propose a method to write the model in Eulerian coordinates. Our model includes many physical properties, such as the existence of internal gravity waves or the variation of the sound speed with depth.